﻿@page
@using IdentityServer.HttpHandlerBase
@model SimpleRazorPage2Model
@{
    ViewData["Title"] = "SimpleRazorPage2";
}
@functions
{
    public class SimpleRazorPage2Model : PageModelBase
    {
        //public void OnGet()
        //{
        //    ViewData["Title"] += "-Get";
        //}

        public void OnGetDemo()
        {

        }
    }

    //在已经定义PageModel的Razor页面中不会执行PageModel之外定义的Handler
    //下面的Handler不会执行，页面中不会限制“Me”字样
    public void OnGet()
    {
        ViewBag.me = "Me";
    }
}
<h2>SimpleRazorPage2-@ViewBag?.me</h2>

